calculate area under the curve in origin